package com.example.day_0813_103.slice;

import com.example.day_0813_103.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.Operation;
import ohos.agp.components.Text;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

import java.time.temporal.Temporal;
import java.util.HashSet;
import java.util.Set;

public class Two_AbilitySlice_1 extends AbilitySlice {
    private static final HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP,0x00201,"MY_TAG");

    @Override
    public void onStart(Intent intent) {
        HiLog.info(LABEL,"这里是 Two_AbilitySlice 的 onStart");
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_two_ability_slice_1);

        Text text = (Text) findComponentById(ResourceTable.Id_two1_SliceThree);
        text.setText(intent.getStringParam("name"));

        Intent it = new Intent();
        it.setParam("back","清风徐徐");
        setResult(it);
    }

    @Override
    public void onActive() {
        HiLog.info(LABEL,"这里是 Two_AbilitySlice 的 onActive");
        super.onActive();
    }
    @Override
    protected void onInactive() {
        HiLog.info(LABEL,"这里是 Two_AbilitySlice 的 onInactive");
        super.onInactive();
    }

    @Override
    protected void onBackground() {
        HiLog.info(LABEL,"这里是 Two_AbilitySlice 的 onBackground");
        super.onBackground();
    }

    @Override
    public void onForeground(Intent intent) {
        HiLog.info(LABEL,"这里是 Two_AbilitySlice 的 onForeground");
        super.onForeground(intent);
    }
    @Override
    protected void onStop() {
        HiLog.info(LABEL,"这里是 Two_AbilitySlice 的 onStop");
        super.onStop();
    }
}
